Skip to content

docs: fill in missing replacement guidance for deprecated APIs - #1261

Open
GOODBOY008 wants to merge 1 commit into
apache:mainfrom
GOODBOY008:docs/deprecated-replacement-guidance
Open

GOODBOY008 wants to merge 1 commit into
apache:mainfrom
GOODBOY008:docs/deprecated-replacement-guidance

Conversation

@GOODBOY008

Copy link
Copy Markdown
Member

Problem

A pass over all @Deprecated sites in fesod-sheet main code found a handful where the javadoc gives no usable replacement, or is malformed:

Site Before
WriteContext#getCurrentSheet() / #needHead() @deprecated please us e{@link ...} — typo breaks the tag text
Ehcache(Integer) ctor no javadoc at all on a public deprecated constructor
SimpleReadCacheSelector(Long, Integer) ctor prose says the parameter "has already been abandoned" but no @deprecated tag naming the replacement
SimpleReadCacheSelector.maxCacheActivateSize field guidance names maxCacheActivateBatchCount only as plain text
StringImageConverter class deprecated with only an @see, no @deprecated tag
ReadSheetHolder#getTotal() replacement mentioned as loose prose (use: getApproximateTotalRowNumber()), not a tag

Change

Javadoc-only edits filling in / fixing the @deprecated guidance at those six sites across five files. No code changes.

Two notes on accuracy: StringPathnameImageConverter is byte-for-byte the same implementation as the deprecated StringImageConverter (both read a local file via FileUtils.readFileToByteArray), so the guidance describes it as a rename rather than inventing a behavioural difference; and SimpleReadCacheSelector's replacement is the no-arg constructor plus setMaxCacheActivateBatchCount(...) because no such constructor exists yet.

Scope

Deliberately limited to sites with missing or broken guidance. Sites that already carry correct @deprecated tags (the EasyExcel/FastExcel/FastExcelFactory facades, AnalysisContext, ExcelReader, Font, the four Abstract*WriteHandler bases, AbstractIgnoreExceptionReadListener, ExcelWriteHeadProperty) are untouched.

ExcelBuilder and AbstractExcelWriterParameterBuilder also contain deprecated members but are excluded here — #1181 already rewrites their javadoc (including the @deprecated tags); this PR avoids colliding with it.

Verification

$ ./mvnw -q compile -pl fesod-sheet   # OK
$ ./mvnw -q spotless:apply -pl fesod-sheet   # no additional changes produced

Javadoc-only diff: 5 files changed, 13 insertions(+), 4 deletions(-).

Signed-off-by: gongzhongqiang <gongzhongqiang@apache.org>
Copilot AI balanced review requested due to automatic review settings October 25, 2026 03:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

Comment on lines +83 to +84
* @param maxCacheActivateSize
* maximum size of the activated cache

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please format it as a single line.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants